package com.jmyd.coupon.server.mapper;

import com.jmyd.coupon.server.domain.po.SceneCoupon;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * @author samphin
 * @since 2021/7/14 16:15
 */
public interface SceneCouponMapper extends Mapper<SceneCoupon> {
    int batchInsert(@Param("list") List<SceneCoupon> list);

    int updateBatch(List<SceneCoupon> list);

    int insertOrUpdate(SceneCoupon record);

    int insertOrUpdateSelective(SceneCoupon record);


    SceneCoupon selectFreeOfChargeCoupon();

    List<SceneCoupon> selectNoUseCoupon(@Param("userId") String userId);

    List<SceneCoupon> selectExpiredCouponList(@Param("userId") String userId);

    List<SceneCoupon> selectList(SceneCoupon record);
}